﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<MBS_FoodBooking.Models.ShoppingCartModel>" %>
<table style="width: 100%;">
    <% foreach (var item in Model.LstShoppingCart)
       { %>
    <tr>
        <td align="center">
            <% using (Ajax.BeginForm("RemovefromCart", "FoodBooking", new AjaxOptions { UpdateTargetId = "shoppingCart" }))
               { %>
            <img src='<%= Url.Content(item.ImgUrl)%>' style="width: 20px; height: 25px; padding-left: 10px;
                padding-bottom: 3px; padding-top: 3px" />
            <label style="width: 20px; height: 25px; padding-left: 10px; padding-bottom: 3px;
                font-family: @Dotum; padding-top: 3px">
                <%=Html.Encode(item.ItemName) %>
                *
            </label>
            <%= Html.Label(item.Quantity.ToString())%>
            <input type="hidden" value="<%= item.Id %>" name="hdnIndex" />
            <button id="btnAdd" type="submit" style="width: 30px; height: 25px; padding: 2px 10px 2px 5px">
                <img src="../../Content/Images/Cancel.png" style="width: 30pxpx; height: 25px;" /></button>
            <%} %>
        </td>
    </tr>
    <% } %>
    <tr>
        <td colspan="2" align="center">
            <%=Html.Encode("Total Price: ") %>
            <%= Html.Encode("$ " + Model.Price.ToString(("#,##0.00#")))%>
        </td>
    </tr>
    <tr>
        <td colspan="2" align="justify">
            <% using (Html.BeginForm("CheckOut", "ShopingCart")) { %>
            <div>
                <button id="btnProceed" type="submit" style="azimuth: center">
                    <img src="../../Content/Images/checkout.png" style="width: 70px;" /></button>
            </div>
            <% } %>
        </td>
    </tr>
</table>
